from contextlib import contextmanager
import time

@contextmanager
def timeblock(label):
    start = time.process_time()
    try:
        yield
    finally:
        end = time.process_time()
        print('process_time {} : {}'.format(label, end - start))